package com.example.backend.service.storage;

import io.minio.messages.Bucket;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.List;

public interface MinIOService {

    String uploadAvatar(MultipartFile avatarFile, String userId) throws Exception;

    String getAvatarUrl(String userId, String contentType);

    void deleteAvatar(String logoUrl) throws Exception;

    String getPermanentUrl(String objectName);

    String getPermanentUrl(String bucketName, String objectName);

    boolean bucketExists(String bucketName) throws Exception;

    void createBucket(String bucketName) throws Exception;

    String uploadFile(InputStream inputStream, String bucketName, String objectName, String contentType) throws Exception;

    String uploadFile(InputStream inputStream, String objectName, String contentType) throws Exception;

    String uploadFile(MultipartFile file, String bucketName, String objectName) throws Exception;

    String uploadFile(MultipartFile file, String objectName) throws Exception;

    InputStream downloadFile(String bucketName, String objectName) throws Exception;

    void deleteFile(String bucketName, String objectName) throws Exception;

    List<Bucket> listBuckets() throws Exception;

    String getPresignedUrl(String bucketName, String objectName) throws Exception;

    String getPresignedUrl(String bucketName, String objectName, int expirySeconds) throws Exception;


}
